package com.itzb.asone.utils;

import java.io.Serializable;
import java.util.UUID;

public class GitId implements Serializable {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;


	/**
	 * 获取主键，一般用于数据库表ID主键字段
	 * @return
	 */
	public static String primaryKey(){
		UUID uuid=UUID.randomUUID();
        String uuidStr=uuid.toString();
        return uuidStr;
	}
	
	
	/**
	 * 生成图片名称
	 * @return
	 */
	public static String getFileName(){
		UUID uuid=UUID.randomUUID();
        String uuidStr=uuid.toString();
        return "FILE" + uuidStr;
	}
	
	
	
	public static void main(String[] a) {
		System.out.println(GitId.primaryKey());
		System.out.println(GitId.primaryKey());
		System.out.println(GitId.primaryKey());
		System.out.println(GitId.primaryKey());
		System.out.println(GitId.primaryKey());
		System.out.println(GitId.primaryKey());
	}
}
